import re
headers_str = """
authority: jcap.m.jd.com
method: POST
path: /cgi-bin/api/fp
scheme: https
accept: application/json, text/plain, */*
accept-encoding: gzip, deflate, br
accept-language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7
cache-control: no-cache
content-length: 1355
content-type: application/x-www-form-urlencoded;charset=UTF-8
cookie: TrackID=1AOoQV0hRXqpw5UZuT1yHAN_zjlg-V9phLoHX6q-_1cd_cf0DPt7sFe8rqCMjaBXUQuIMJAua7OZKP_VTdUDhLNpxXSsGhhWW4QzXGwndQ1I; thor=317DF86A79D04E8215965CA2889DDF81D80BD84BD52113E163E563DD583F746711B8BB41C1E7EF5B61287801D0182A40249ECA97536FF660850EB67EF464936F094983DA656BAF6B1D533760C5AD13F0991892E5CCEFDEBDABF7FA497B52CE744CE7E48915581224CF17BC48C2E19C7AAAF3FEA96359716CBA30221C284F360F; pinId=HmFWFGJN4LdIdSh6p8esqQ; pin=%E5%90%9B%E4%B8%B0%E4%BB%93%E5%BA%93; unick=%E5%90%9B%E4%B8%B0%E4%BB%93%E5%BA%93; ceshi3.com=000; _tp=e10oAB9dBLaSDC0YXNjnjTY0Zu1YFrVkJ0SsFh9xVKP2l8IjeMBOZGQ4B9ljV6kr; logining=1; _pst=%E5%90%9B%E4%B8%B0%E4%BB%93%E5%BA%93
origin: https://www.jdl.cn
pragma: no-cache
referer: https://www.jdl.cn/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
"""

for line in headers_str.splitlines():
	# \1和\2用来匹配分组的内容
    print(re.sub('^(.*?): (.*)$',r"'\1': '\2',",line))

